package cn.tool.dao.mapper;

import cn.tool.dao.pojo.Jjzz;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 胖树
 * @since 2022-10-08
 */
public interface JjzzMapper extends BaseMapper<Jjzz> {

    List<Jjzz> selectByAreaCode(@Param("orgQueryAreaCode") String orgQueryAreaCode);

    @Select("select count(*) from sys_jjzz where pcode = #{pcode} and org_code is not null")
    int selectCountByAreaCode(Jjzz jjzz);

    List<Jjzz> selectByNewAreaCode(@Param("orgQueryAreaCode") String orgQueryAreaCode);
}
